<%@ page import="com.github.pagehelper.PageInfo" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>展示用户信息</title>
    <!--导入bootstrap框架-->
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/css/index.css" rel="stylesheet">
    <script src="${pageContext.request.contextPath}/js/jquery-3.2.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/owl.carousel.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.mixitup.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.fancybox.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.counterup.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/waypoints.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/jquery.magnific-popup.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/countdown.js"></script>
    <script src="${pageContext.request.contextPath}/js/script.js"></script>

</head>
<style>
    .lt {
        text-align: center;
        margin: 20px;

    }
</style>
<script>
    var jj=0;
</script>

<body>
<div>
    <div class="lt">
        <h3>展示管理员账户数据</h3>
        <%-- <button onclick="find()" type="button" class="btn btn-default navbar-btn" style="float: right">查看历史客户</button>--%>
    </div>

    <div>
        <table class="table table-hover">
            <tr>
                <th class="first_td">管理ID</th>
                <th class="first_td">管理员姓名</th>
                <th class="first_td">管理账号</th>
                <th class="first_td">管理密码</th>

            </tr>
            <c:forEach items="${pageBean.list}" var="admin" varStatus="vs">
                <tr>
                    <td class="first_td">${vs.count}</td>
                    <td class="first_td">${admin.adminName}</td>
                    <td class="first_td">${admin.adminUsername}</td>
                    <td class="first_td">${admin.adminPassword}</td>
                </tr>
            </c:forEach>
        </table>
    </div>

</div>
</body>
<%--分页--%>
<nav aria-label="Page navigation">
    <ul class="pagination" id="uls">
        <li>
            <a href=${pageContext.request.contextPath}/admin/findAll?currentPage=${pageBean.currentPage - 1}&rows=5 aria-label="Previous">
                <span aria-hidden="true">&laquo;</span>
            </a>
        </li>
        <%-- <li><a href="#">1</a></li>
         <li><a href="#">2</a></li>
         <li><a href="#">3</a></li>
         <li><a href="#">4</a></li>--%>



        <c:forEach begin="1" end="${pageBean.totalPage}" var="i">
            <c:if test="${pageBean.currentPage==i}" >
                <li  class="active"><a href=${pageContext.request.contextPath}/admin/findAll?currentPage=${i}&rows=5>${i}</a></li>
            </c:if>
            <c:if test="${pageBean.currentPage!=i}" >
                <li><a href=${pageContext.request.contextPath}/admin/findAll?currentPage=${i}&rows=5>${i}</a></li>
            </c:if>
        </c:forEach>
        <li>
            <a href=${pageContext.request.contextPath}/admin/findAll?currentPage=${pageBean.currentPage + 1}&rows=5 aria-label="Next">
                <span aria-hidden="true">&raquo;</span>
            </a>
        </li>
        <span><font size="5">共有${pageBean.totalCount}位客户,共${pageBean.totalPage}页</font></span>
    </ul>
</nav>
</html>

